import Vue from 'vue';
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import index from '../common/app/app.vue';
import store from '../store'
import router from  '../../resources/config/route'
import Axios from '../config/axios'
import VueAxios from 'vue-axios'
import ElementUI from 'element-ui';
import { loginEach } from  '../../resources/config/route/beforeEach'
import 'element-ui/lib/theme-chalk/index.css';
import './element-variables.scss'
import VueQuillEditor  from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import './style.css'
import './globe.css'

import uploader from 'vue-simple-uploader'
Vue.use(uploader)

Vue.use(ElementUI);
//使用axios
Vue.use(VueAxios, Axios)
//添加路由
Vue.use(VueRouter)
//添加状态管理
Vue.use(Vuex)
//添加login守卫
// loginEach(router)
Vue.use(VueQuillEditor);

let storage;
if(!window.localStorage){
}else{
    Vue.prototype.STORAGE=window.localStorage;
}
export var quitLogin = true;
Vue.prototype.quitLogin=quitLogin;

new Vue({
    el: '#app',
    router,
    store,
    render (h) {
        return h(index)
    }
})
